# coding:utf-8
from rest_framework import serializers
from goods_info.models import AttachmentModel


class AttachmentsSerializer(serializers.ModelSerializer):
    """
    附件和图片的序列化器和反序列化
    """
    type_display=serializers.CharField(source='get_a_type_display',read_only=True)

    class Meta:
        model = AttachmentModel
        fields = "__all__"

